package com.gadgets.busi.bm02.dto;

import com.gadgets.framework.common.dto.BaseDTO;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Ck3ModifyGenreatorDTO extends BaseDTO {

    /**
     * 请求参数ID列表
     */
    private List<Ck3ModifyItemDTO> propertiesList;

    public void sort(){
        if(null!=propertiesList) {
            propertiesList.sort(new Comparator<Ck3ModifyItemDTO>() {
                @Override
                public int compare(Ck3ModifyItemDTO o1, Ck3ModifyItemDTO o2) {
                    return (int) (o1.getId() - o2.getId());
                }
            });
        }
    }

    public List<Ck3ModifyItemDTO> getPropertiesList() {
        return propertiesList;
    }

    public void setPropertiesList(List<Ck3ModifyItemDTO> propertiesList) {
        this.propertiesList = propertiesList;
    }
}
